STEP 6: Let's add our basketball!

  • Click on the section of the toolkit and drag Basketball into your program.
  • Change the name before the equals sign to ball.

From now on, we'll use the variable name ball to assign actions to this sprite.

To navigate the page using the TAB key, first press ESC to exit the code editor.

stage.set_background("halfcourt") sprite = codesters.Sprite("player4") sprite.go_to(215, -175) net = codesters.Sprite("basketballnet") net.go_to(215, 175)
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)